/**
 * Created by chaoCheng on 2017/1/13.
 */
function DetailModel($http, API, $resource) {
    var transforms = $http.defaults.transformResponse
    this.actions = {}

    //查询播放文件和播放分组
    this.actions.searchfileandgroup = {
        method: 'POST',
        url: API + '/playPlanContoller/fileAndGroupList',
    }
    //添加文件
    this.actions.addFile={
        method:'POST',
        url:API+'/playPlanContoller/addFile'
    }
    //删除播放文件
    this.actions.deleteFile={
        method:'GET',
        url:API+'/playPlanContoller/deletePlanFile/:id'
    }
    //添加分组
    this.actions.addGroup={
        method:'POST',
        url:API+'/playPlanContoller/addGroup'
    }
    //删除播放分组
    this.actions.deleteGroup={
        method:'GET',
        url:API+'/playPlanContoller/deletePlanGroup/:id'
    }
    //查询播放分组
    this.actions.searchGroup = {
        method: 'POST',
        url: API + '/playPlanContoller/groupList',
        // isArray:true,//当后台返回数组时需要这个参数
    }

    var Model = $resource.call(this, this.url, this.params, this.actions)

    return Model
}
